package com.yuyou.train.user.service.impl;

import com.yuyou.train.service.api.user.entity.UserImport;
import com.yuyou.train.user.mapper.UserImportMapper;
import com.yuyou.train.user.service.IUserImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by yujin.liu on 2018/2/8.
 */
@Service
public class UserImportServiceImpl implements IUserImportService {

    @Autowired
    private UserImportMapper userImportMapper;

    @Override
    public int insert(UserImport userImport){

        return userImportMapper.insert(userImport);
    }

    @Override
    public UserImport findLatestUserImportByType(String type){

        UserImport userImport = userImportMapper.selectLatestUserImportByType(type);
        return userImport;
    }
}
